<?

$r = Q1("select * from useradmin where u_id = 1");


if($_POST['user'] == $r['u_user'] && $_POST['pass'] == $r['u_pass'] )
{
	$_SESSION['inlog'] = 1;
	exit("<script type=\"text/javascript\">window.location='index.php';</script>");
}
else if($_REQUEST['logout'] == 1) 
{
	$_SESSION['inlog'] = '';
}
?>
<form action="" method="post" name="f1">
user : <input name="user" type="text" /><br />
pass : <input name="pass" type="password" /><br /><br />
<input name="login" type="submit" />
</form>